<template>
  <div>
    <el-menu
      :default-active="$route.path"
      class="el-menu-vertical-demo"
      background-color="#1b3554"
      text-color="#fff"
      active-text-color="#409EFF"
      router
      :collapse="isCollapse"
      is-active
    >
      <el-menu-item>
        <span slot="title">后台管理系统</span>
      </el-menu-item>
      <el-menu-item index="/layout/home">
        <i class="el-icon-menu"></i>
        <!-- <span slot="title">首页</span> -->
        <span slot="title">{{ $t("menu.home") }}</span>
      </el-menu-item>
      <el-menu-item index="/layout/goods">
        <i class="el-icon-document"></i>
        <!-- <span slot="title">商品管理</span> -->
        <span slot="title">{{ $t("menu.goods") }}</span>
      </el-menu-item>

      <el-submenu index="/layout/params">
        <template slot="title">
          <!-- <span slot="title">规格参数</span> -->
          <i class="el-icon-setting"></i>

          <span slot="title" v-text="$t('menu.params')"></span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/layout/params/Specification">
          
            <span slot="title">规格与包装</span>
          </el-menu-item>
        </el-menu-item-group>
      </el-submenu>

      <el-menu-item index="/layout/advert">
        <i class="el-icon-message-solid"></i>
        <span slot="title">广告分类</span>
      </el-menu-item>
      <el-submenu index="/layout/order/orderlist">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>订单管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/layout/order/orderlist">订单列表</el-menu-item>
          <el-menu-item index="/layout/order/orderback">退货管理</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-menu-item index="/layout/user">
        <i class="el-icon-message-solid"></i>
        <span slot="title">个人中心</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  props: ["isCollapse"],
  data() {
    return {
      // isCollapse: false
    };
  },
};
</script>

<style lang="scss" scoped>
.el-menu {
  border-right: 0;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
  // transition-duration:0.5ms;
  transition-timing-function: ease;
}
</style>
